package dormouse.vfs.metadata;

import java.io.IOException;
import java.util.Map;
import java.util.Set;

import org.apache.commons.vfs2.FileObject;

/**
 * This interface defines the methods necessary for a IMetadataReader.
 * 
 * @author Mark
 * 
 */
public interface IMetadataReader {

	/**
	 * This method gets the metadata for a given file.
	 * 
	 * @param file
	 *            the file you want to interrogate.
	 * @return A map containing metadata key/value pairs.
	 */
	public Map<String, String> getMetadata(FileObject file) throws IOException;

	/**
	 * This method gets the keys to the metadata.
	 * 
	 * @return
	 */
	public Set<String> getMetadataKeys();

	/**
	 * This method gets a specific metadata value for a file.
	 * 
	 * @param file
	 *            the file being interrogated
	 * @param key
	 *            the key for the metadata value.
	 * @return The value.
	 */
	public String getMetadataValue(FileObject file, String key)
			throws IOException;

	/**
	 * This method gets the file extensions supported by this reader. This
	 * allows the developer to determine which files are readable by the reader.
	 * 
	 * @return
	 */
	public String[] getFileExtensions();
}
